
public class Student implements Cloneable{

	public static final char Accepted = '+';
	public static final char Dismissed = '-';
	
	private String name;
	private String surName;
	private char[] tasks;
	
	public Student(String name, String surName, char task1, char task2, char task3){
		
		this.name = name;
		this.surName = surName;
		this.tasks = new char[3];
		tasks[0] = task1;
		tasks[1] = task2;
		tasks[2] = task3;
	}
	
	public String getName(){
		
		return name;
	}
	
	public void setName(String name){
		
		this.name = name;
	}
	
	public String getSurName(){
		
		return surName;
	}
	
	public void setSurName(String surName){
		
		this.surName = surName;
	}
	
	public char getTask(int index){
		
		return tasks[index];
	}
	
	public void setTask(char task, int index){
		
		tasks[index] = task;
	}
	
	@Override
	public boolean equals(Object o){
		if(o == null) return false;
		if(o == this) return true;
		if(o.getClass() != this.getClass()) return false;
		if(!name.equals(((Student)o).getName())) return false;
		if(!surName.equals(((Student)o).getSurName())) return false;
		return true;
	}
	
	@Override
	public int hashCode()
	{
		return name.hashCode() + surName.hashCode();
	}
}
